package com.balabala.gym_user.controller.app;

import com.balabala.gym_user.service.VipCardService;
import com.balabala.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.simpleframework.xml.Path;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 何涛
 * @Date: 2023/05/07/ 14:14
 * @description 会员卡控制器层
 */
@RestController
@RequestMapping("/app/vipCard")
@Api(tags = "会员卡前端接口")
@CrossOrigin
@Slf4j
public class VipCardAppController {
    @Autowired
    VipCardService vipCardService;

    @ApiOperation("根据课程id查询支持会员卡")
    @GetMapping("/getSupportVipCardByCourseId/{courseId}")
    public Result getSupportVipCardByCourseId(@PathVariable("courseId") Long courseId)
    {
        return Result.ok(vipCardService.getSupportVipCardByCourseId(courseId));
    }
}
